<?php if (exist_widget_column('all')) { ?>
	<div id="primary" class="sidebar">
<?php if (exist_widget_column('Primary Sidebar')) { ?>
		<ul class="xoxo">
<?php dynamic_sidebar('Primary Sidebar') ?>
		</ul>
<?php } ?>

		<div id="sidebar-double-column">
<?php if (exist_widget_column('Sidebar Column1') ) { ?>
			<div id="sidebar-column1" class="sidebar-column">
				<ul class="xoxo">
<?php dynamic_sidebar('Sidebar Column1') ?>
				</ul>
			</div><!-- #sidebar-column1 .sidebar-column -->
<?php } ?>

<?php if (exist_widget_column('Sidebar Column2') ) { ?>
			<div id="sidebar-column2" class="sidebar-column">
				<ul class="xoxo">
<?php dynamic_sidebar('Sidebar Column2') ?>
				</ul><!-- #sidebar-column2 .xoxo .sidebar-column -->
			</div><!-- #sidebar-column1 .sidebar-column -->
<?php } ?>
		</div><!-- #sidebar-double-column -->
	</div><!-- #primary .sidebar -->

	<div id="secondary" class="sidebar">
<?php if (exist_widget_column('Secondary Sidebar') ) { ?>
		<ul class="xoxo">
<?php dynamic_sidebar('Secondary Sidebar') ?>
		</ul>
<?php } ?>
	</div><!-- #secondary .sidebar -->

<?php } else { ?>
	<div id="primary" class="sidebar">
		<ul class="xoxo">
			<li id="search">
				<h3 class="widgettitle"><label for="s"><?php _e('Search','dkret'); ?></label></h3>
					<form id="searchform" method="get" action="<?php bloginfo('home') ?>">
						<div>
							<input id="s" name="s" class="text" type="text" value="<?php the_search_query() ?>" size="10" tabindex="1" accesskey="S" />
							<input id="searchsubmit" class="button" name="searchsubmit" type="submit" value="<?php _e('Find', 'dkret') ?>" tabindex="2" />
						</div>
					</form>
			</li><!-- #search -->
		</ul>

		<div id="sidebar-column1" class="sidebar-column">
			<ul class="xoxo">
				<li id="categories">
					<h3 class="widgettitle"><?php _e('Categories','dkret'); ?></h3>
					<ul>
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
					</ul>
				</li>
				<li id="archives">
					<h3 class="widgettitle"><?php _e('Archive','dkret'); ?></h3>
					<ul>
<?php wp_get_archives('type=monthly&limit=10'); ?>
					</ul>
				</li>
			</ul>
		</div><!-- #sidebar-column1 .sidebar-column -->

		<div id="sidebar-column2" class="sidebar-column">
		  <ul class="xoxo">
				<li id="bookmarks">
					<ul><?php wp_list_bookmarks(); ?></ul>
				</li>
			</ul><!-- #sidebar-column2 .xoxo .sidebar-column -->
		</div>

	</div><!-- #primary .sidebar -->

	<div id="secondary" class="sidebar">
		<ul class="xoxo">
			<li id="login">
				<h3 id="widgettitle">Login</h3>
				<ul>
					<?php wp_register(); ?>

					<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
				</ul>
			</li>
		</ul>
	</div><!-- #secondary .sidebar -->

<?php } ?>